package a04threadmethod;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86131
 * Date: 2024-04-16
 * Time: 21:56
 */
public class MyThread extends Thread{
    //子类想调动父类的方法
    //调动父类的构造方法
    public MyThread() {
    }

    public MyThread(String name) {
        super(name);
    }

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println(getName()+"@"+i);
        }
    }
}
